package com.test.sdk.core.service;

import com.test.sdk.common.util.ResponseTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "SDK-REDIS")
public interface RedisService {
    @RequestMapping(value = "/set", method = RequestMethod.GET)
    ResponseTO set(@RequestParam("key") String key, @RequestParam("value") String value);
    @RequestMapping(value = "/setex", method = RequestMethod.GET)
    ResponseTO setex(@RequestParam("key") String key,@RequestParam("value") String value,@RequestParam("expire") Integer expire);
    @RequestMapping(value = "/expire", method = RequestMethod.GET)
    ResponseTO expire(@RequestParam("key") String key,@RequestParam("expire") Integer expire);
    @RequestMapping(value = "/get", method = RequestMethod.GET)
    ResponseTO get(@RequestParam("key") String key);
    @RequestMapping(value = "/mset", method = RequestMethod.POST)
    ResponseTO mset(@RequestBody Map param);
}
